package com.edu.ad.service;

import com.edu.api.entity.ad.PromotionAd;
import com.baomidou.mybatisplus.extension.service.IService;
import com.edu.api.entity.common.Pageable;
import com.edu.api.entity.common.ResponseDTO;

import javax.servlet.http.HttpServletRequest;
import java.text.ParseException;
import java.util.List;

/**
 *
 */
public interface PromotionAdService extends IService<PromotionAd> {

    /**
     * 修改广告状态
     * @param id
     * @param status
     * @return
     */
    ResponseDTO updateAdStatus(Integer id,String spaceId,String status,String startTime,String endTime);

    /**
     * 获取对应广告位广告
     * @param spaceId
     * @return
     */
    List<PromotionAd> getAdsBySpaceId(int spaceId);

    /**
     * 添加或修改后台广告位
     * @param ad
     * @param request
     * @return
     */
    ResponseDTO addOrUpdateBackStageAd(PromotionAd ad, HttpServletRequest request);

    /**
     * 条件获取所有广告位信息
     * @param pageable
     * @param ad
     * @return
     * @throws ParseException
     */
    ResponseDTO getAllAd(Pageable pageable, PromotionAd ad) throws ParseException;

    /**
     * 批量删除广告位
     * @param ids
     * @return
     */
    ResponseDTO deleteAdByIds(List<Integer> ids);

}
